home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 2 / MacMania 2.toast / Demo's / Tools&Utilities / Programming / Mac wt 0.04 Folder / MacWT.fat 0.04 / Mac WT source / MacWT.fat.make < prev    next >
Encoding:
Text File  |  1994-05-11  |  4.1 KB  |  131 lines  |  [TEXT/MPS ]

  1. #   File:       MacWT.fat.make
  2. #   Target:     MacWT.fat
  3. #    Author:        turly
  4. #
  5. #    MPW PPCC Makefile
  6. #
  7. #    Notes
  8. #    =====
  9. #    1. This is a hack!
  10. #
  11. #    2. Included is a method of building a 68K MacWT via MPW C. But this was so crap
  12. #    that I haven't even looked at it for days. (See comments in "mac_wt.h".)
  13. #
  14. #    3. GCCr1.371r15 falls over and dies trying to compile wt. I have other things to
  15. #    do first (like get a PPCC version working!), then I'll try this again.
  16. #
  17. #    4. Turning on full optimisation with PPCC for file "render.c" causes bizarre images.
  18. #    My version of PPCC is dated Oct 12 1993; newer ones could be tried out...
  19. #    (or this may be a base bug, which I haven't touched!)
  20. #
  21. PPCObjDir    = :Objs:PPC:
  22. 68KObjDir    = :Objs:68K:
  23. WTDefines    = -D SystemSevenOrLater -D macintosh
  24. WTIncs        = -I :wt: -I :turlsLibs:
  25. IncFiles    = # mac_wt.h
  26.  
  27. 68KSegOpts    = -s turlz
  28. 68KLibs        = "{CLibraries}"CSANELib.o "{CLibraries}"StdClib.o "{Libraries}"Runtime.o "{Libraries}"Interface.o
  29. 68KCOptions    = {WTDefines} -r -b -opt full -mc68020 {WTIncs}
  30.  
  31. PPCWTLibs    = "{PPCLibraries}"InterfaceLib.xcoff "{PPCLibraries}"MathLib.xcoff "{PPCLibraries}"StdCLib.xcoff ∂
  32.                 "{PPCLibraries}"StdCRuntime.o "{PPCLibraries}"PPCCRuntime.o
  33.  
  34. DefPPCOptimisations = -opt speed
  35. PPCCOptions = {WTDefines} -D __powerc -D powerpc -D __powerpc -D __ppcc -w conformance -appleext on -i : {WTIncs}
  36.  
  37. PPCObjects = ∂
  38.         {PPCObjDir}MacMain.pc.o ∂
  39.         {PPCObjDir}MacWT.pc.o ∂
  40.         {PPCObjDir}Failure.pc.o ∂
  41.         {PPCObjDir}FixMulDiv.pc.o ∂
  42.         {PPCObjDir}DirScrnWrite.pc.o ∂
  43.         {PPCObjDir}fixed.pc.o ∂
  44.         {PPCObjDir}framebuf.pc.o ∂
  45.         {PPCObjDir}gifload.pc.o ∂
  46.         {PPCObjDir}list.pc.o ∂
  47.         {PPCObjDir}render.pc.o ∂
  48.         {PPCObjDir}table.pc.o ∂
  49.         {PPCObjDir}texture.pc.o ∂
  50.         {PPCObjDir}view.pc.o ∂
  51.         {PPCObjDir}world.pc.o ∂
  52.         {PPCObjDir}worldfile.pc.o ∂
  53.         {PPCObjDir}wt.pc.o ∂
  54.         {PPCObjDir}wtmem.pc.o
  55.  
  56. 68KObjects = ∂
  57.         {68KObjDir}MacMain.c.o ∂
  58.         {68KObjDir}MacWT.c.o ∂
  59.         {68KObjDir}Failure.c.o ∂
  60. #        {68KObjDir}FixMulDiv.c.o ∂
  61.         {68KObjDir}DirScrnWrite.c.o ∂
  62. #        {68KObjDir}fixed.c.o ∂
  63.         {68KObjDir}framebuf.c.o ∂
  64.         {68KObjDir}gifload.c.o ∂
  65.         {68KObjDir}list.c.o ∂
  66.         {68KObjDir}render.c.o ∂
  67.         {68KObjDir}table.c.o ∂
  68.         {68KObjDir}texture.c.o ∂
  69.         {68KObjDir}view.c.o ∂
  70.         {68KObjDir}world.c.o ∂
  71.         {68KObjDir}worldfile.c.o ∂
  72.         {68KObjDir}wt.c.o ∂
  73.         {68KObjDir}wtmem.c.o
  74.  
  75. ######### MPW C 68K (or GNU C) People could uncomment this
  76. #MacWT ƒƒ {68KObjects}
  77. #    Link -t APPL -c 'McWt' {68KObjects} {68KLibs} -o {Targ}
  78. #    SetFile -a B {Targ}
  79.  
  80.  
  81. # "MacWT" is the 68K application which should have been built earlier
  82. # (preferably using Metrowerks.) If it's not, we just copy the resource
  83. # file into a file called "MacWT", which will then get Rezzed into MacWT.fat
  84. # (BUT IT WON’T BE FAT!!)
  85.  
  86. MacWT ƒƒ WT.µ.rsrc
  87.     Echo "include ∂"{NewerDeps}∂";" | Rez -a -o {Targ}
  88.  
  89. MacWT.fat ƒƒ MacWT
  90.     Echo "include ∂"{NewerDeps}∂";" | Rez -a -o {Targ}
  91.     SetFile -t APPL -c 'McWt' -a B {Targ}
  92.  
  93. MacWT.fat ƒƒ WTppc.µ.rsrc
  94.     Echo "include ∂"{NewerDeps}∂";" | Rez -a -o {Targ}
  95.     SetFile -t APPL -c 'McWt' -a B {Targ}
  96.  
  97. MacWT.fat ƒƒ {PPCObjects}
  98.     PPCLink  {PPCObjects} {PPCWTLibs} -main __start -o MacWT.fat.xcoff
  99.     makePEF MacWT.fat.xcoff -o MacWT.fat  ∂
  100.         -l InterfaceLib.xcoff=InterfaceLib ∂
  101.         -l MathLib.xcoff=MathLib ∂
  102.         -l StdCLib.xcoff=StdCLib ∂
  103.         -ft APPL -fc 'McWt'
  104.     delete MacWT.fat.xcoff
  105.  
  106. # Need specific command dependency for this file so it (and only it!) goes in the Main segment...
  107. {68KObjDir}MacMain.c.o ƒ MacMain.c
  108.     {C} MacMain.c {68KCOptions} -o {Targ}
  109.  
  110. # Need specific command dependency for this file so the PPCC optimiser doesn’t bugger it up...
  111. # Using the "-opt speed" causes walls in the resulting image to be, erm, black!
  112. {PPCObjDir}render.pc.o ƒ :wt:render.c :wt:slice.c
  113.     PPCC :wt:render.c {PPCCOptions} -opt local -inline user -o {Targ}
  114.  
  115.  
  116. {68KObjDir} ƒ : :turlsLibs: :wt:
  117.  
  118. {PPCObjDir} ƒ : :turlsLibs: :wt:
  119.  
  120.  
  121. .c.o        ƒ    .c        {IncFiles}
  122.     {C} {DepDir}{Default}.c {68KCOptions} {68KSegOpts} -o {TargDir}{Default}.c.o
  123.  
  124.  
  125. # Uncomment this dependency and comment the one below if using PPCC under MPW.
  126. .pc.o        ƒ    .c        {IncFiles}
  127.     PPCC {DepDir}{Default}.c {PPCCOptions} {DefPPCOptimisations} -o {TargDir}{Default}.pc.o
  128.  
  129. .a.o        ƒ    .a
  130.     {Asm} {DepDir}{Default}.a {AOptions} -o {TargDir}{Default}.a.o
  131.